﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Protocol.party;
using Pixysoft.Weblications.Sango.Dao;
using System.Data;
using Pixysoft.Framework.Noebe;
using Pixysoft.Weblications.Sango.Protocol;

namespace Pixysoft.Weblications.Sango.Command.party
{
    partial class SangoPartyHandler
    {
        private const int pagesize = 10;
        private const int pageindex = 0;

        public party_applylist party_applylist()
        {
            string userCode = SangoManager.Authentication();

            party_applylist response = ReflectionManager.CreatePojo<party_applylist>();
            response.Succeed = false;

            Entities.Usr_Partymember member = PartyDao.getActiveMember(userCode);
            string partyCode = member.Partyprimarycode;

            DataTable table = PartyDao.GetApplyingMembers(partyCode, pageindex, pagesize);
            response.members = PartyFacade.ToApplyMembers(table);
            response.Succeed = true;
            return response;
        }


    }
    public interface party_applylist : ISangoResponse
    {
        List<party_listmember> members { get;set;}
    }
}
